package com.realife.eson.common.util.jwt;

import java.io.Serializable;
import java.util.Date;

/**
 * @version V1.0
 * @author: guangcheng
 * @date: 2022/4/14 16:03
 * @description:
 */
public class JWTInfo implements Serializable, ITokenInfo {
    private static final long serialVersionUID = 1L;
    private String accountId;
    private String username;
    private String name;
    private String sessionId;
    private Date expiration;

    public JWTInfo(String username, String accountId, String name, String sessionId, Date expiration) {
        this.username = username;
        this.accountId = accountId;
        this.name = name;
        this.sessionId = sessionId;
        this.expiration = expiration;
    }

    public JWTInfo(String accountId, String username) {
        this.username = username;
        this.accountId = accountId;
    }

    public String getAccountId() {
        return this.accountId;
    }

    public String getUniqueName() {
        return this.username;
    }

    public String getName() {
        return this.name;
    }

    public Date getExpiration() {
        return this.expiration;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public String getUsername() {
        return this.username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setExpiration(Date expiration) {
        this.expiration = expiration;
    }

    public String getSessionId() {
        return this.sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }
}

